﻿<%@ Page Language="C#" MasterPageFile="Site.master" AutoEventWireup="true" CodeBehind="redify.aspx.cs" Inherits="GeniusWebApplication.redify" %>

<asp:Content ID="_css_place" ContentPlaceHolderID="css_place" runat="server">
    <link href="./css/self.css" rel="stylesheet" type="text/css">
	<link href="./css/common.css" rel="stylesheet" type="text/css">
    <link href="./css/frame_main.css" rel="stylesheet" type="text/css">
    <link href="./css/dialog_box.css" rel="stylesheet" type="text/css">
	<link rel="stylesheet" type="text/css" href="./css/common_v6.css" media="all">
    <link rel="stylesheet" type="text/css" href="./css/setting_style.css" media="all">
</asp:Content>

<asp:Content ID="_left_bar" ContentPlaceHolderID="left_bar" runat="server">
    <div class="frame-side" id="js_page_side">
            
            <!--网盘分类目录-->
            <div class="directory-menu">
                <div class="dir-menu-side">
                    <ul>
                        
                        <li tab="u" class=""><a href="./self.aspx"><i class="ico-dm dm-cloud"></i><span>空间</span></a></li>
                        <li tab="note"><a href="./redify.aspx"><i class="ico-dm dm-notebook"></i><span>修改</span></a></li>
                        <li tab="msg"><a href="./message.aspx"><i class="ico-dm dm-message"></i><span>消息</span><em id="js_msg_recv_count" style="display: none; "></em></a></li>
                    </ul>
                </div>
            </div>
        </div>
</asp:Content>

<asp:Content ID="_upload" ContentPlaceHolderID="upload" runat="server">
    
</asp:Content>
	
<asp:Content ID="_library" ContentPlaceHolderID="library" runat="server" >
	<span onmouseover="overZui(this);" onclick="clickNav(this);">修改信息</span>
	
	
    <script>
        function overZui(l) {
            var a = document.getElementById("zuixinSelected");
            var length_l = getElementLeft(l) - 29;
            a.style.left = length_l + "px";
        }
        function clickNav(l) {
            var a = document.getElementById("zuixinSelected0");
            var length_l = getElementLeft(l) - 29;
            a.style.left = length_l + "px";
        }
	</script>
</asp:Content>

<asp:Content ID="_you_shang_jiao" ContentPlaceHolderID="you_shang_jiao" runat="server" >
	<span class="headerItem" id="message_notice">消息</span>
	<span>&nbsp;&nbsp;&nbsp;|</span>
	<span class="headerItem" id="concern_notice">关注</span>
	<span>&nbsp;&nbsp;&nbsp;|</span>
	<span class="headerItem"><a href="./log.aspx">退出</a></span>
</asp:Content>

<asp:Content ID="_main" ContentPlaceHolderID="main" runat="server" >
   <div id="main">
		<form id="js_form_info" action="./self.aspx" method="post" >
			<div class="s-large">
				<table class="form-list form-list-new">
					<tbody>
						<tr>
							<td class="form-text">
								姓名：
							</td>
							<td>
								<div class="td-div td-cell">
									
									<input type="text" class="text realname" id="name" maxlength="20"
									style="width:160px;">
								</div>
								
								
							</td>
						</tr>
                        
                        <tr>
							<td class="form-text">
								新密码：
							</td>
							<td>
								<div class="td-div td-cell">
									
									<input type="password" class="text realname" id="npasswd" maxlength="20"
									style="width:160px;">
								</div>
								
								
							</td>
						</tr>
                        <tr>
							<td class="form-text">
								确认：
							</td>
							<td>
								<div class="td-div td-cell">
									
									<input type="password" class="text realname" id="n2passwd" maxlength="20"
									style="width:160px;">
								</div>
								
								
							</td>
						</tr>
						<tr>
							<td class="form-text">
							</td>
							<td>
								<button class="button" onclick="clickSave()" id="btn_Save" type="button">
									保 存
								</button>
                                <script>
                                    function clickSave() {
                                        var a = $("#btn_Save");
                                        var name = $("#name").val();
                                        var npasswd = $("#npasswd").val();
                                        var n2passwd = $("#n2passwd").val();
                                        if (name == "") {
                                            alert("姓名不为空！");
                                        }
                                        else if (npasswd == "") {
                                            alert("密码不为空！");
                                        }
                                        else if (npasswd.length > 30) {
                                            alert("密码过长！");
                                        }
                                        else if (n2passwd == "") {
                                            alert("密码不为空！");
                                        }
                                        else if (n2passwd.length > 30) {
                                            alert("密码过长！");
                                        }
                                        else if (n2passwd !=npasswd) {
                                            alert("两次密码不一致！");
                                        }
                                        else {
                                            $.ajax({
                                                type: "POST",
                                                url: "redify.aspx/ajaxRedifyUser",
                                                data: "{username:'" + name + "',npassword:'" + npasswd + "'}",
                                                contentType: "application/json; charset=utf-8",
                                                success: function (data) {

                                                    var info = eval("(" + data.d + ")");
                                                    var suc = info.result;
                                                    if (suc == 1) {
                                                        $("#account").val("");
                                                        $("#passwd").val("");
                                                        alert("修改成功！");
                                                        location.href = "./self.aspx";
                                                    } else {
                                                        alert("修改失败!");
                                                    }
                                                }
                                            });
                                        }
                                    }
                                </script>
							</td>
						</tr>
					</tbody>
				</table>
			</div>
		</form>
	</div>
</asp:Content>

<asp:Content ID="_float_right" ContentPlaceHolderID="float_right" runat="server" >
   
</asp:Content>
